package com.report.client;

import java.net.MalformedURLException;
import java.util.Iterator;
import java.util.List;

import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;

import com.report.form.ReportForm;
import com.report.service.ReportServiceHibernate;

public class ReportServiceSelectForList
{
	public static void main(String[] args)
	{
		Service srvcModel = new ObjectServiceFactory().create(ReportServiceHibernate.class);
		XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance()
				.getXFire());

		String URL = "http://127.0.0.1:8080/ExtWS/service/ReportServiceHibernate";
		try
		{
			ReportServiceHibernate service = (ReportServiceHibernate) factory.create(srvcModel,URL);

			ReportForm report = new ReportForm("1" , "1" , "1" , "2");
			
			List list = service.selectForList(report);
			
			Iterator it = list.iterator();
			while(it.hasNext()) {
				System.out.print(it.next());
			}
			
			
		}
		catch (MalformedURLException e)
		{
			e.printStackTrace();
		}
	}
}
